package com.shujia.student;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class MakeData {
    public static void main(String[] args) throws Exception {


        /**
         * 将数据扩大10万倍
         */

        FileReader fileReader = new FileReader("java/data/students.txt");

        BufferedReader reader = new BufferedReader(fileReader);


        FileWriter writer = new FileWriter("java/data/big_student.txt");

        BufferedWriter bufferedWriter = new BufferedWriter(writer);


        String line;

        while ((line = reader.readLine()) != null) {
            for (int i = 0; i < 100000; i++) {

                bufferedWriter.write(line);
                bufferedWriter.newLine();//新建一行

            }
        }
        reader.close();
        bufferedWriter.close();

    }
}